﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VAdvantage.Classes;
using VAdvantage.Common;
//using ViennaAdvantage.Process;
//using System.Windows.Forms;
//using ViennaAdvantage.Model;
using VAdvantage.DataBase;
using VAdvantage.SqlExec;
using VAdvantage.Utility;
using System.Data;
using VAdvantage.Logging;
//using VAdvantage.Controller;
using VAdvantage.Model;
using VAdvantage.Grids;
using System.Windows;
namespace VAdvantage.Model
{
    public class CalloutProjectLine : VAdvantage.Model.CalloutEngine
    {
        public String Charge(Context ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
        {
            
            if (value == DBNull.Value || value == null || value.ToString() == "")
            {
                return "";
            }

            int Cid=Util.GetValueOfInt(mTab.GetValue("C_Charge_ID"));
            X_C_Charge charge = new X_C_Charge(ctx, Cid, null);
            decimal amt=charge.GetChargeAmt();
            mTab.SetValue("PlannedQty", 1);
            mTab.SetValue("PlannedPrice", amt);
            return "";
        }
    }
}
